﻿using d1Common.WebController;
using d1Project.Modules.Common.do4A.Domain;
using d1Project.Modules.Common.do4A.Models;
using d1Project.Tools;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace d1Project.Modules.Common.do4A.Controllers.a2
{
    [Route("do4A/a2/Token")]
    public class Token2Controller : ControllerBase
    {
        protected override DbContext dbContext
        {
            get
            {
                return null;
            }
        }

        public IHttpActionResult Get(string id, string pwd)
        {
            string accessToken = AuthenticationMgr.Instance.CheckToken2(id, pwd);
            return Ok(new { accessToken = accessToken });
        }
    }
}
